package net.gxf.common.util;

import java.util.Iterator;
import java.util.Map;

/**
 * 用于显示map内容的一个工具类，在调试程序时使用
 * 
 * @author: maybe
 * 
 */
public class ShowMapUtil {

	/**
	 * 键值对为String类型的map
	 * 
	 * @param map
	 * @return
	 */
	public static String showMap(Map<String, String> map) {
		StringBuffer buffer = new StringBuffer();
		Iterator<String> iterator = map.keySet().iterator();
		while (iterator.hasNext()) {
			String next = iterator.next();
			buffer.append(next).append("=").append(map.get(next)).append("\r\n");
		}
		System.out.println(buffer.toString());
		return buffer.toString();
	}

}
